from tools.tools import get_device, save_configure, save_error, start_ts_thread


def main():
    host: list = get_device()
    res = start_ts_thread(host)
    for item in res:
        if item['status']:
            save_configure(item)
        else:
            save_error(item)


if __name__ == '__main__':
    main()
